#!/bin/bash
#更新spring-boot应用

source /etc/profile
. $BEETLE_SHELL_PATH/error.sh

projectName=$1

if [ ! ${projectName} ]
then
    error_exit "参数存在空值projectName"
fi

# 分支名
branch=$2

codePath=/usr/local/beetle/code/${projectName}


bash $BEETLE_SHELL_PATH/git_checkout.sh ${codePath} ${branch} || error_exit

cd ${codePath} || error_exit

mvn -U clean install -DskipTests || error_exit


